home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 113 / XENIATGM113.iso / Patch / No One Lives Forever / NOLFUpdate003.exe / Setup / Swedish / swsetup.rul < prev    next >
Text File  |  2001-04-25  |  2KB  |  92 lines

  1. //
  2. // Language chooser script
  3. //
  4.  
  5. declare
  6.         STRING svLanguage;
  7.  
  8.         BOOL bvEnglish, bvFrench, bvGerman, bvSpanish, bvSwedish;
  9.  
  10.         STRING svTitle, svMsg;
  11.         STRING svEng, svFre, svGer, svSpa, svSwe;
  12.  
  13.         STRING svFullPath, svRootPath, svFindStr;
  14.         prototype BuildRootPath();
  15.  
  16. program
  17.  
  18. StartHere:
  19.         Disable(BACKGROUND);
  20.         Disable(BACKBUTTON);
  21.         Enable(DIALOGCACHE);
  22.  
  23.         bvEnglish = FALSE;
  24.         bvFrench = FALSE;
  25.         bvGerman = FALSE;
  26.         bvSpanish = FALSE;
  27.         bvSwedish = TRUE;
  28.  
  29.         svTitle = "VΣlj installationssprσk";
  30.         svMsg   = "VΣlj ett sprσk f÷r installationen:";
  31.         svEng   = "Engelska";
  32.         svFre   = "Franska";
  33.         svGer   = "Tyska";
  34.         svSpa   = "Spanska";
  35.         svSwe   = "Svenska";
  36.  
  37.         svFullPath  = SRCDIR ^ "swedish.ins";
  38.         svFindStr   = "Swedish\\swedish.ins";
  39.         BuildRootPath();
  40.  
  41.         // Prompt for language to install
  42.         SetDialogTitle(DLG_ASK_OPTIONS, svTitle);
  43.  
  44.         AskOptions(EXCLUSIVE, svMsg, svEng, bvEnglish, svFre, bvFrench, svGer, bvGerman, svSpa, bvSpanish,
  45.                     svSwe, bvSwedish);
  46.  
  47.         // Kick off the specified language's installer
  48.         if(bvEnglish = TRUE) then
  49.             Enable(HOURGLASS);
  50.             DoInstall(svRootPath ^ "English\\english.INS", "", NOWAIT);
  51.             exit;
  52.         endif;
  53.  
  54.         if(bvFrench = TRUE) then
  55.             Enable(HOURGLASS);
  56.             DoInstall(svRootPath ^ "French\\french.INS", "", NOWAIT);
  57.             exit;
  58.         endif;
  59.  
  60.         if(bvGerman = TRUE) then
  61.             Enable(HOURGLASS);
  62.             DoInstall(svRootPath ^ "German\\german.INS", "", NOWAIT);
  63.             exit;
  64.         endif;
  65.  
  66.         if(bvSpanish = TRUE) then
  67.             Enable(HOURGLASS);
  68.             DoInstall(svRootPath ^ "Spanish\\spanish.INS", "", NOWAIT);
  69.             exit;
  70.         endif;
  71.  
  72.         if(bvSwedish = TRUE) then
  73.             Enable(HOURGLASS);
  74.             DoInstall(svFullPath, "", NOWAIT);
  75.             exit;
  76.         endif;
  77.  
  78. exit;
  79.  
  80.  
  81. function BuildRootPath()
  82.         NUMBER nStrLen, nPos;
  83. begin
  84.          nStrLen = StrLength(svFullPath);
  85.         nPos = StrFind(svFullPath, svFindStr);
  86.  
  87.         if (nPos >= 0 && nPos < nStrLen) then
  88.  
  89.             StrSub(svRootPath, svFullPath, 0, nPos);
  90.  
  91.         endif;
  92. end;